Added javadoc + updated misc issues