Adding removeNode method to the linked list implementation.