Support removing nodes

Change-Id: Ida24a5c7858da6a69ba400dd907dde28bbf9e954