Code cleanup

Let parseHexDigit return an optional instead of a tuple.
Add more test cases.
Merge pull request #28 from IngmarStein/master

Code cleanup