Added detection of variables and parameters