C++/Linq2: Refactor