public static String getSetting(String name) {
        if (hasVariableWithName(name)) {
            PrioritizedVariable var = getVariableByName(name);
            if (var.PrioritizationExpression == null) {
                //Get newest
                TaggedValue newestValue = var.Values.get(var.Values.size() - 1);
                return parseString(newestValue.Value);
            } else if (var.PrioritizationExpression.equalsIgnoreCase("oldest")) {
                //Get oldest
                TaggedValue newestValue = var.Values.get(var.Values.size() - 1);
                return parseString(newestValue.Value);
            } else if (var.PrioritizationExpression.equalsIgnoreCase("int:largest")) {
                //Get largest integer
                int returnValue = 1024;
                for (TaggedValue tv : var.Values) {
                    if (Integer.parseInt(parseString(tv.Value)) > returnValue) {
                        returnValue = Integer.parseInt(parseString(tv.Value));
                    }
                }
                return Integer.toString(returnValue);
            } else {
                //Get newest
                TaggedValue newestValue = var.Values.get(var.Values.size() - 1);
                return parseString(newestValue.Value);
            }
        } else {
            return "null";
        }
    }