Removed optimization of h which produced rounding errors
Added documentation
Added documentation
Added javadoc comments