Turn project into node module (v2)

Replaces #13.