Small refactor to database schemas