add some extra debug info and clean up xor test code