Move the EventHandler registration in a separate extension file