Refactoring favourite and link classes