def yaml(self):
        return yaml.dump(self.serialized, default_flow_style=False,
                         encoding=None)
def exitMode(self, mode):
        if mode in self.modeList:
            self.modeList.remove(mode)