fixed minor issues/template metaprogramming gorp with Math::Mean/Median