minor code cleanup, and much javadoc comment writting