Changed if/else/if/else... to switch statement

Okay, I'll repull, for hopefully the last time :cold_sweat: