javadocs + code cleanup