jslint errors fixed
Nodeunit tests added.