Fixed statistics. Also attempted to finish up sorter behavior, even though it doesn't seem to be working right now.