Improved Substance.Document API. *not yet ready*
Fixed some regressions.