Maxcube fix for wallthermostat program data reading error + some cleanup