Histogram and tests. Also moved order.hh to stats.