Implemented equals method in Model.