[960987] Refactor diff functions into a new file