Added (very) simple unit tests. Run them with mocha or make test.