Major refactor. Fix issue #5. Fix issue #3.

This PR prepares the way to add plugins and solves at least two issues from the previous version.

Note : the version has not been bumped, and it is still at `1.0.0`! Bumping a version should be made inside `package.json` and `server.js`. (We might read `package.json` to set the version inside `server.js`....)