refactored bufferedsocket
continued to make palaceclient.js working