Refactor models.