Fix numerics
Merge branch 'master' into monitor
Add monitor stuff to test.py