Separated difference detection logic from difference keyword matching logic.