Improve tag manipulation