Improve systray activation behavior; more refactoring