DB Refactor