Refactoring classes and creators out of main