WIP API documentation.

Refactored a lot, and automated the build, with a watching feature.

HOWEVER I still have an issue with reloading modules using require: I can't manage to properly resolve from the local require of a module in order to remove it from the cache.