WIP. Code cleanup. Added LOGGING.  Start work on Graph.