Added a few constants that might be useful
Some cleanup

Also added  some new math utility functions