Refactoring tags on detail template