Adding 'Content-Lenght' header for multi-part response payload.
Code cleanup.