moved ace in script.js to load it faster and save http requests, minor bug fixes and typos