Bug fixes to context menu: make sure not to duplicate event listeners or do actions twice, be more specific about focused node when inserting from menu