Applied smart pointers to Tag related classes