Cleanups on DoublyLinkedList patcher code