Remove the changed flag
Add functions to get the next/previous elements
Simplify the document process

Now the document is only processed for those elements that are
queued and is no way to override it.
Port the svg document to this new approach