Trying to fix more bugs in the tests
Fixed bug in surfaceDistR

Fixed bug that made surfaceDistR error when using a cached result where phiR_end was less than phiR_start