Added RegisterCtrl code.

Added RegisterCtrl code.