Mostly complete rewrite

Rewrite as a proper state machine to better handle exhaust mode
transitions and LCD information changes. Also trying out separating
code (setup, functions, etc) into separate files.