A big reason for the database code refactoring is that, besides making everything cleaner / clearer, the self-hosted version will also support different database backends, like SQLite. It won't be completely ready for that when the code is released, but the groundwork will be there.