Added javadocs + small changes