Factored seed stuff from utils.