Refactors socket.js, creating draw.js and canvasSetup.js