Replaced 'environment' for 'spatial' in templates.