fixes #7
fixes #7: move `DOC` and `EMPTY` to common.js; manage `NR` namespace