I've committed some sins, but the tests pass

Can extract this out to objects later. I want to see how hairy it gets
once I put ranges and modulos in play.