Implemented remove method for ListGraph