More Scalafication.

Changed some of the simpler classes, and required java interoperability changes.