More fixes to refactoring.  Worked through tests so theyre all working.