Minor fixes before for NPM + added version number

Dealt with module.exports and exports to make possible to publish on NPM.

(unrelated) also added version number in domino (domino.version).