Add removeMenuItem call for native menus.
Also add error handling code for addMenu() and addMenuItem().