Implementation of delete node function. But I have problems to delete all the edges linked whit the current node