Implemented fast mean updates.

Also added tests for new mean updates.