format code and fixed some bugs in socket.io & content verification.