clean up java code slightly, fixing some eclipse warnings