Switch from singly-linked lists to doubly-linked lists. Closes #10.