Figured out how to make the desperately needed change of implementing all math funcs in the same file rather than separate files. So much better now.