Minor changes
Revert back to previous head

Now calculates average (mean) values with full precision.