register: Allow call register with a module name and make require automatically

Change-Id: Ie328a6553519e9b2458241068c01d8cb61090c60