Better concurrency, and add histogram output