Fix alg.js to work in node.
Convert alg.js into submodule.