introduce concept of tasks and move logic out of specifyapp.js