cleanup and some javadoc comments added