Overall code cleanup

* Removed the need for a double function call on define
* Improved JSHint support
* Cleaned up var definitions to top of function call
Removing needless check

Due to the nature of this plugin, it's actually being used like a factory,
not a constructor. Consequently since  you never refer to `this` within
the `EventChain` method there's no need to force the use of the `new`
keyword.
Reformatting pull request slightly and fixing global reference in test.