Added more options for streaming. General bug fixes and optimization