cleaning up java syntax issues