Need to set state property before calling setState...
Record cmds in history before execution to make web ui nicer