Starting Main refactoring