Andrew's patch that adds equals and hash but revamping compare also. Signed-off-by: Andrew Purtell <apurtell@apache.org>