Fixed cartesian to spherical conversion
Fixed failing tests