doubly linked list refactor & documentation