Added javadoc and more