Cleaned up MidpointInterpolation somewhat