add javadoc and remove some comments