Finnished refactoring database