Adding response locals to template rendering

Fixes #264