Removed exsessive code to retrieve ids in models