Both internal and external now use a directory stack to navigate back and forward, updating the list based on the directory at the top of the stack.