updated use of node packages and added some tests