Refactoring tag module.