Tidy up
Only push history if the content has changed