Lots of things: expanded state machine; added hardware control functions
Re-factored; added gradual heat code