Updated update_remotes script to handle profile as well