Added different update formula. Both should work identically
Fixed a lot of bugs