Fix bugs that produced compile errors

- Fix removal of authors, affiliations and references on update and delete
- Add equals method to Model