Code improvement. I reworked the code so that it now uses one script tag instead of two.

There may be some benefit from this change if the logic of the graph should be delivered in a separate .js file.