use CUTEST environment
make stream handles a little more type-safe
fix HSTREAM struct screwup