Fix a few small bugs, add benchmarks.