Cleaning up some code
Cleaned up C code