removed some more Scala, by migrating part of the Java compiler