Improve tag generation.