Fix window size check to exit more gracefully
Fix rpc queue being stopped twice
Split hotkeys and process queue into different files