Remove unused methods. Added javadocs.