Implementation of node removing.