def __init__(self, filename=None):
        self.filename = None
        if filename:
            self.load(filename)
def exitMode(self, mode):
        if mode in self.modeList:
            self.modeList.remove(mode)