Incorporate code review feedback

- corrected createProtobufStream signature
- removed duplicate stream header generation code