More debug output and added benchmarks.