Added logic and UI for favorites