re-structure to turn into a proper node module
work in progress to get node module working