cleaned up unused code in app.js and made add_files execute sequentially

Can run into problems with git's locking if you don't make it sequential