last massive commit, restructured to (hopefully) reflect system architecture