[WO-304] refactor to UMD style, implement node shim, add tests