Refactored command/event registration
It works, again :)