Refactoring tag structure