Refactoring DB