Removes useless code and fixes benchmark.