Reorganized variables in 'runProgram()'