Break out some tumbler.pl code into two modules