Refactor event handler
Merge pull request #191 from troopjs/feature/handler

Refactor event handler