Move the gradients to their own file to be re-used by other components.