Cleanup equal? implementation