Refactored the main class and added Launcher class