Moving 'lib.math' to 'tmath', moving some globals into trace.