Move remote.connect to lib/remote