Refactors graph.js to never refresh the page

The graph is cleared and redrawn when parameters are changed.

Parameters are automatically updated in the url bar for easy hyperlinking.