Further bodges and attempts to fix command processing.

Giving up on this track.