Create a template implementation for a doubly linked list