Many -- changed handling of globals, filters, state config

Now a new sub-module for containing the globals. Made code much clearer. Editing filter section started. Put several more flags for things that are operating or not. Now saving state on exit, loading on entry.
globals.py -- encapsulates the global parameters.

Imported as g in many places makes globals much cleaner and clearer