Test whether this works with the template stuff
Switched to template solution  for WPS inputs
Using templates also for outputs
Refactored some methods