Move calculate_mean to /lib; make CalculateMean its own class