Added buttons to change settings on page.
Also, changed AI.js structure.