Throwing exception instead of assert fail in case of wrong library use
Fixing serious bug in XOR handling
Leave empty line for readability
Adding tests to check XOR interface