Added tests and benchmarks.