Refactored C#