Modification of app.js
Added code to manage resources on load.