Tolerance class needs to be public so users can actually receive that type. Fix some compile warnings.