Template code refactoring, index markup