Added --lookup. Fixed bug in findAndProcessVariables where some variables would never get looked up.