WIP: building a proper UI for editing a file.

Some things don't quite work properly yet...