Ported code from spooky_secondary into main scope, app.js. Commented right now but will uncomment once first process is working flawlessly. Priority right now is to get primary process functioning and synchronous execution working