Refactoring templates and recipe variables