Reworked streaming version + better public api