Added javadocs. Minor changes.