Added owner_ids to models, added scopes to models and exception handling in controllers.