simplified publish(), added lots of comments

Also fixed bug in unsubscribe() and removed fire().
Hopefully you'll find my comments useful and the code to be more readable.