Updated build process, rewritten bin tools to nodejs