Improved ContextMenu command dispatching; minor bugs