Moved event registration to an extension