Replaced classOf[SomeClass] with getClass where possible.