Add basic implementation with xor and contrast tests.