Refactor to make PATH and HOME globals for exec.