memwidget and getalertcolor() function moved to separate files