Refactoring in C