Added emit/broadcast events. Added qunit.