Added javadocs and updated the README file.