Refactoring going on

In preparation for Spiritual EDB docs.
Refactoring is working
Bug in menu selection + minor fixes
Working out for now