Reimplement how we handle events and update to new 0.6 style.

This is based on the code from @jnweaver in PR #49 and @bshelton229 in PR #50 (thanks a lot guys!).

@icetan, @pthorin or @liedman:
Next step is to branch off as 0.6, tag as v0.6.0 and update gh-pages. Could you do that or re-add me to the kartena-organization? (I think the only way to collaborate on repos is to be in the same organization actually).