Modifications and verification for C code.

Signed-off-by: acappiello <acappiel@andrew.cmu.edu>