Formatting
Lots of small improvements to pubsub code