Cosmetic changes
Changed update order
Switched to double
Use assertions instead of preconditions for private methods
Added missing precondition checks
Working on nifty integration and some housekeeping