Rework the job submission/fetching and add debug output.