fixes to pubsub engine and samples

we now have a sample script to show the pubsub
engine at work, as well as a slight change
to when the togglelist is initialized.

this is so we can grab a reference before the
toggle namespace and engine is initialized