Removing as many instances of JavaObject.type as I can and replacing them with references to JavaObject.cls.