Rebasing devel into job_templates

Rebasing, so we can do a clean PR to devel afterwards (checked to work in my own fork)