Changes to allow fan to be controlled independently of mode. Other needed fixes were made along the way.