Initial work on nx-resource.
Initial work on nx-document.