Added comments and changed switch layout.

Deleted alternative if-else statements