fix some typos and javadoc