Fixing a bunch of Java compile errors