cleanup of node module - test for all methods and some minor bug fixes