cleanup stream storage code