formalized sockets for client, added ref as well
laid groundwork for streaming binary, master next
added file support for client