Added a profile model.
Fix bug in updating models.