Move duplicated JavaScript and CSS for diff to common files