Add comments, format code and clean up
Add tray icon