Reference types and a compare function. More tests need to be written.