Fix build on JDK 1.6, and code formatting.