Attempted to fix bug. No way of knowing, as code doesn't run on my (Mihir's) machine due to setup issues.
Fixed issue with xor
Reviewed changes, comment cleanup
Merge pull request #1 from pyprogrammer/bug-fixing

Bug fixing