Add progress listener

I've added a simple progress listener.
I also simplified the stream handling, there is now only one InputStream.