Implement C++ versions of the commands: submit, run