Fixed a few things for correct java here.