Pulled working C code.