cleanup of unused REMOTE_HOSTS and better positioning of parameter shift