Refactored to include methods for mean/median, bins/z-score still not working