Refactor out the subprocess
syntax errors