Fixed and simplified menu handling.
Add comment.