Removed while loop in main