Moved event handler registration

Moved event handler registration to before the inits as to make events
available