Minor fixes to tests, rename grad, Gradient -> gradient