Refactoring of databse files