Code

some speedups, some fixes to the benchmarking