public void sortVariables(final Comparator<String> comp) {
        Collections.sort(variableList, comp);
        wasModified = true;
    }
returns the list position where variable was removed, or -1 if var was not found
main/src/main/java/cgeo/geocaching/utils/formulas/VariableList.java