Thermostat -> Move variables to instance variables. Bug.
HW_Thermostat -> Think I have finally resolved the critical bug here once and for all.  Apparently by setting both heat and cool setpoints at the same time causes the thermostat to get confused and actually switch its modes seemingly at random.   Only set the setpoint for the appropropriate mode (which realistically should have been done anyway).