general refactoring.  removing lots of redundant code