smallpt: Refactoring in C#