Splitting files, refactoring