Refactor code and provide API for Server/ClientRequestInfo. Add doc