Major modifications to match new pub/sub API