Entering and Exiting the Command Environment