Generation of more CPP code. Pending return and fixing while, among othe...

...r problems