Framework stuff.

There's some stuff in there about using arrays, ignore it since we have
to use a linked list.