Added newai.js ref to index.

Added newai.js to indexes, nerfed some errors and cleaned up some other
stuff.