Bug: 13658473 Change-Id: I90bbaa2e34687e7456c9a247d51c64cd91782891
Did some re-factoring to share code with upcoming (multi stream) packager. Change-Id: I2b3845e48ba6aa63a95ecc276abcb52c8355d8d5