Create main, Refactoring