Basic heat system code. (Refactored from a first draft that never made it
to github.)