Pushed out the classOf call to another scope to reduce calling. This also removes the need to literal matching using back ticks.