start of massive refactor

This will put all of Jeff's (and my) changes onto develop, to form a new starting point for the rest of our work this semester.