closing to tray, gui and settings

#479

don't merge yet, will be continued.