cleanup of opencalais code
similarity code added/modified