Added javadoc and changed the access level for some of the methods