Added missing intersection
Midpoint moved when 0 to avoid problems with symmetric intervals. Added a limit on refinements to avoid tiny numbers