Large file refactoring