deal with messages posted with invalid json as a payload (i.e. messages not intended for us) - just ignore
don't log a spurious error on console if a message with payload 'null' is received
allow underbars in hostname
clean up innocuous, but confusing variable redefinition, add lots of semi-colons /cc @jedp
give notifications access to origin as well as invocations
fix comment that was lying
fixed broken doctest.