New document UI.
Stupid merge.