Use the Reader monad more heavily, starting to move some functions out of the DB monad.