Javadoc fixes and math fix