Refactoring C Code: Implementing parsing