Fixed a few typos and improved javadoc