Add gradient update to register() and to correlation scripts (only for inital reg). Some extra tests.