Initial modularization attempt, makes things much more split up and less
hacky.  Still need better file names.