more of the massive refactor

starting to fix tests