Added cartesian to spherical back in, and fixed a nubugger issue