getSelectedRange was not a function. (local or in codeMirror).

The documented way to get the start and end of a text selection is to use
getCursor(true),getCursor(false) -- which isn't intuitive.. *shrug*
Add _ (underscore.js?) to globals … jshint was complaining …
setupEnergyGraph: addEventListners and RemoveEventListners extracted.
setupEnergyGraph reuse realTimeGraph with .reset (was always create new)

This seems to be the main thing which fixed the reset button behavior.
finishSetupFullPage extracted setupExtras
setupModelCodeEditor prevent global export of md2dmodel (thanks jshint!)