cstream,dht,newton: improve code quality