started refactoring code a lot.  things broken.