Started expanding the navigation menu into the messages substructure.
Added some comments and cleaned up some code.