Moved registration event handler to module