Implemented extensions in handshakes and installed extension hooks in websocket
Code cleanup