Updated to use get_remoteprefix everywhere (it uses validation!)