Changed a few things to work with the models