migrated ace utility functions to ace.js; cleaned up app.js