Make some nice libraries that are more capable of handling MQTT subscriptions etc.
That way, future stuff won't be such a freaking nightmare to work with :S
Later on, possibly even replace the old MQTT backend with one that doesn't cause un-recoverable crashes and shit :S