Added equality checks for testing.