Finish moving functions into classes.  Cleanup issues from last commit.