Use array of objects instead of a set in the linear store.
Remove this code.
Add assert.
Use struct instead of class.
Use init method.
Fix incorrect use of references.