making this cleaner. moved some of the configuration logic to the model, which I guess is where it should go?