Fix for custom menus and better filtering on available menus.
Removed commented-out code.