Refactoring with C#