Refactoring the database into a central location