Remove large switch block

[Slower](http://jsperf.com/switch-contains) (albeit in browsers), but less bulky.