pushing up a lot of my refaefactoring changes, lots of good stuff