Refactoring one file to modules