More breaking the code out

Another chunk of #13.