Refactoring mqttc_session module (WIP)