Adding x->remove() method to each node class