Changed SSE client code to use file objects made from socket instead of socket directly, cleaned up all new code.