Refactoring tag widgets