Fixing mis-interpreted code functions. moving function into the FavoritesDockWidget class