Refactor labels in templates