Properly remove nodes