Clean up grid search code a little bit and fix outdated comments.