Reformatted code and removed redundant dictionary
Unit test for GetEnumerableVariancesByKey