Refactoring of files to new structure