refactored for node publishing; added todos
refactored to fix ci tests
removed unneeded global defs from jshint
refactored tests