Refactor and minor fix on the distance/context weighting.
Removed old search function. Removed wikisum variable. Some changes to design.