Update the code to reflect the changes to the models in the previous commit. Also performed a migration.