better icon handling and system tray icon removal on exit