Delete unused variables from expression from VariableFactory