Change each loops to shorthand and debugged app.js