Fixed a lot of things - refactored a lot of code / comments
Mostly, I changed code that loaded and added configuration data.
I also removed the use of some globals - from the present changes it
is possible to eliminate almost all globals.
Almost got the add prompt and key exchange working