Fixes

Fixed arithmetic bugs, added more tests, cleaned up logging, cleaned up
README.
index