Added Median to stats
cleaned up some commented old code