Code cleanup, edited tests, and updated benchmarks