Still working on cleanup for pubsub