Support document versions
Add support for promises
Add a more complete initial test, using the promise interface
Eliminate the reduce weirdness in favor of a map -> object transform