Now better separated and uses Program better. Also no longer needs internal lookupProgram' utils function.