Fix bugs in backend. Make it throw an error if it doesn't find the template with the given ID and accept not specifying certain keys.
Implement GUI for adding fields from template.

Currently broken because of bugs in backend.