RemoteExecutor and some tidying up