Code tidy and working on registration via MQTT.