Add register() function to modules and remove (now) unneeded function