Fixed RUMIcurve so it runs in O(n) time. Still testing/fixing one or two bugs