State communication

Merge back into master, manual mode is at least stable.