More changes to the models, plus code improvements and cleanup