Fix implementation of continuation marks.

Also, switch to using a linked list for storing key/value mark pairs.