#3 #4 Internal directory state, and improvements to internal commands.