Prevent onInsert from being called twice.
Insert of fragment wasn’t working in Firefox
Put stylesheet links into head instead of appending to body
(hoped to fix stylesheets not working in IE8, but it didn't do it)