workin
emit-document, defemitter, :data op, refactor

* add emit-document function
* add defemitter macro
* add :data op
* refactor to use multimethods in some places