Added functions min and max for a range of variables.