make nce.js a module; refactor test code to app.js