Referctoring stream libraring