Refactor root remote (without protocol) and add testing