Move diff formatting to separate file and diff new and deleted files