Added javadoc to reflect changes and added methods.