make callback fire on every panel.onShown event

This pull request fixes #9. In the process I also cleaned up some of the code comments and `console.log`s to make things clearer and more readable.