Clean distributed grid search from the first chapter