Refactor diff