simplified publish(), added lots of comments

publish() still had too much code duplication for my taste, so I thought surely I could figure out a better way.
Also fixed bugs in unsubscribe() and merged fire() into publish() since it was only called in one place after my changes.
Hopefully you'll find my comments useful and the code to be more readable.

I can't imagine that I would find anything else I'd want to change after this.