Clean up, comments, switch statement

Cleaned up parts of the program, added some comments, and began some
small output operations. I also converted the multiple if statements to
a switch statement for better readability