Stream test functionality and some fixes.