Added (preliminary) ability to save in JSON, plus a menu item and event handler to test