Java code conventions and cleanup