Some tag-related refactorings. 
Fixed bug of empty Name column in tree view.