Add arithmetic_mean method, fix surf.