Clean up app.js and api.js