Doubly linked list implementation in C. (ESE350)