More fixes related to coordinate systems.

Fix up some dead code, and also employ safer rounding near spherical limits.