more changes. And niostream compiles as library now.