Updated tags handling for nodes and added test cases