Fix #1538 "New iteration doesn't have file metadata"

- createTemplateContentFromBind uses binding template
- add BindingOps and convenience functions
- DatatypeValidation: enforce presence of type
- some refactoring for clarity