Add context menu item for compose window
Refactoring and code tidy in compose.js