I thought I had it with the last commit; turns out, I didn't.
Latest progress... tests pass, and some changes have been made for
readability however, *this* incarnation violates DRY so it's not quite
done.