Refactored

* Moved the contructor part down
* sendEvent is now triggerEvent