javadoc comments and code cleanup