Add require, socket.io. More improvements all around.

Next up: Socket.io with sessions.