fix(benchmarks): Made benchmarks work with new API

& some code cleanup.