Testing (+ stuff)

There is now some decent groundwork for testing this thing. A bunch of refactors as a result, minor api changes (docs updated).

Also added some details on how to hack on this in the readme (npm stuff/etc).