Add test_remote, small related changes to other files