Refactored favorites logic

Heavily refactored favorites logic to make it easier in future updates
to implement or modify behavior dealing with favorites.