General improvements, Node.js regulations, errors

This commit includes a few relatively important changes.

Previously, this library did not handle errors correctly;
it instead used `console.log` (bad) instead of a proper
callback with an error. This commit implements good error
handling practices with an async API.

This commit also includes general improvements in the code;
previously, there were unused or duplicate variables,
non-uniform code style, etc.

This commit handles an error when it is run on an unsupported
platform; previously, it did not error and would run as is, leaving
the user to question "wtf happened?"

It also adds doxygen-style comments to the source code.