Fix dot tan, cleanup globals.

The tests are now global-clean.