Fan control moved into functions
(changes untested!)
More work to fan handlers
(untested changes!)
Added debug messages and fixed fan behaviour, plus various small fixes
(currently broken, do not use!)
Fixed a ton of bugs and added more status messages
Avoid fast oscillation when battery not connected