Major Refactoring to Set.cs