Added a system tray
Integrated system tray, fixed bugs and cleaned code