Refactoring scan templates.