Refactoring. Not sure if this broke evaluation on the debug dataset or it was already broken.