Refactoring to use more functions and reduce footprint
Finished refactoring.  Moved global vars to be in scope.
Added README introduction to project