Added constructor with Stream support
Extracted "InitMetaData" method from constructor