Added Javadoc and fixed typo