Changed indenting of the switch statements to be compatible with jshint.