Minor corrections to javadocs and error message