Move menu command event handling to GM_MenuCommander.
Move sandbox related functions into JSM.
Remove unused imports/definitions.