Completed the reg update code.