added tray functionality with hide capabilities