Big re-work to allow sequences of commands