More refactoring.  Removing unused stuff and simplifying