Clean up PubSubClient code