Refactor index.js and tests to fit `require, exports, module` definition...

... signature.

Finishing a1fdc93831e775b54ab7ebea4dc37321cfae3ad2.
`exports` and `module` are reversed.  http://requirejs.org/docs/api.html#cjsmodule