fixes #7; move logic of type detection -> lang/type.js
fixes #7; manage `NR` namespace; remove method `NR._memoize`; move `NR.mix` -> common.js;