Replaced the thermostat, repaired the primary condensate line and cleared the line. Added a trap and safety switch to the condensate drain.