Replaced if/else's with switch statements

This was just... EEK!