Initial working version of anchor text inversion program: issue #43
Minor refactoring.
Added comment.
Fixed issue #48
fixed issue #43 and issue #48