Fix minor typos in javadoc and error messages.