Improved ModPointSet to use a hash set instead of a simple array.