added metadata editing and saving.

todo:
- load metadata from saved json
- set data in forms
- conflict between edit mode and pressing the ‘d’ key to delete a
selected line/node. probably just need a delete button, or maybe a
better hotkey?