now a node module
cleaned up