This is simple implementation for doubly-linked list.