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

Bigger issue is, you're missing `break` here, which is why Travis CI is yelling at you.