Fixed redirect issues and directory movement issues when
switching between various options within the menu.

Almost all the code has comments.