refactor nxor and do some more code sniff conversions