refining diff display and adding tests