A little cleanup and made the benchmarks work again.
Big cleanup

Also removed unneeded exception and added more unit tests.