added 'local' prefix to template_name
removed 'dcadec' cleanup code that is no longer necessary