Code revision. Made a couple of minor adjustments to the issue77 fix.