Cleaned up A1util.js to only include helping functions. Moved code together into A1main.js.