Some bugfixes and optimizations for running the 3500 dataset