Refactor create_mapping.

- Support embedding of calculated object properties.
- Remove template_type.