Style fixes; update Java code