Clean up Main by using switch case instead of multiple IFs.