ENH: Implement the gradient for rigid registration
ENH: Finish up the optimizer