refactor file structures