Add defaults for random functions
fix some bugs in math
Add some more math tests