Added basic unit tests for functions
Switched the callback arguments to (error, result) instead of (result, error), since that it seems is more adopted.
Wrote up the readme.