Renamed the main loop. Updated the run method in main