Restructured the command action queuing and included level modes for states and commands.