[node-styx] Fixed some bugs, added some tests and util classes