GetResource stuff + tests + sockets.js clean up.