Minor tweaks to loadProgramIntoMemory() function.