Double-linked list implementation