Added javadoc, changed few method names