Combining the input stream and the model
First working(-ish) version!