Code improvements for Loadfavorite.