Code clarified, javadoc generated