Refactoring, new stream model inc.

TODO: Linux support.