Template component refactoring and simplification