add functions to get and set favorites.
Merge remote-tracking branch 'origin/master'