commented out unnecessary code and added
javadoc comments and junit test.