genCstub

TODO refactor, doing too many things.

Meta