restructure parameter extraction in C code generator, interface changed!
add more tests for C code generator and fixed some small issues