Enabled browser compatibility for graph view UI. Works fine with Chrome 36, Firefox 31, Opera 20, confirmed not working with Safari 5 (no support for FileReader API) and IE 11 (due to a bug in IE). Tidied up code and added comments.