Refactored to separate UI from business logic
Added contextual tray icon