Update app.js

findFirstBAafterOne is broken. Need to fix it. It should more accurately be find first BA after a pair that have been moved previously.