Rewrite of the stream handling in StreamPlayer
Some code cleaning