More reverting of database refactor