javadoc + cleaning some code