Refactored console app a bit