Functions 'lookForCommand' and 'lookForEnv' are now implemented in terms of matchCommand and matchEnv respectively, generalizations of the mentioned functions.