Gradient

Merge the Gradient branch.