Replace object accessors with pointer index

Allows for equality testing