Menu Listener and diagnostic lines added