Simplify code
Add some benchmarks