Refactored code
Refactored C code