Code for handling context menu item selection added