Clean up spacing of comments.
Remove console.log statements.
Replace switch with if else.
Clean up equality checking.
Restyle var assignment and fix typo.