CLEANUP: Turned binCounts() and binMeans() into plain functions.