Lots of refactoring. Added a bug that allows multiple favourites of the same kind. Fixed a crash deleting favourites.