Fixed up js side pub/sub

Signed-off-by: Brandyn A. White <bwhite@dappervision.com>
Added test handler and fixed minor bugs

Signed-off-by: Brandyn A. White <bwhite@dappervision.com>