Make initialization more lazy. Modest speed improvements on matching. Add benchmarks. Tidy up some code