Implemented linked lists.

Deadlock test cases work.