Adding comment and also performance refactoring by Michael Westbay.
Merge pull request #6 from ljo/fix-decodeHexChar