Replaced if/else's with switch statement

It's indeed weird, but indenting it tends to push stuff too much to the right, which would be very bothersome for a lot of people ;w