ENH: Refactored the registration class
ENH: Fixed leak
ENH: Fixed the gradient on the correlation metric and documented the class