Small refactoring of database objects