tests, Image.gradient, more tests, lots of tidying