Create ai.js for defining AI functions.
Fix indenting to Matt's style.