Implemented stream-api

Closes #3
0.4.0