Started refactoring configDiff
Refactored configDiff to remove repeated code