The main purpose of this commit was basically fix an awkward bug as statements were being emitted in reverse order due to them being prepended in a linked list, and then popped from the head of the list while emitting this is a problem. To get constant time popping from the end of the list I changed the list to a finger tree sequence.