Make request buffer size a variable instead of a constant.
Add code documentation.