Refactoring touch navigation template.