Adding 'import' + json fixes

- Added an 'import parameters' button to get existing parameters from
the template.
- Redesigned the 'apply' procedure to preserve the existing templatedata
object