Now registering events properly.