Added generating menu from JSON.

Also added toggle feature of menu item.