Add set struct, make use of it for more efficient membership checking