Fixed requestTargets bug and moved sockets.io setup into app.js.