style fixes and also make export system actually compatible with node
add package.json for npmjs publishing