HTML validation & templating changes

Templating changes are such that the code updates an ID, and so that
the templating will govern the layout
stabilised calculation code

basically the elemental analysis was getting hidden when the mass spec
was being ticked.  Fixing that and making sure that the
`CCalc.finished_calculating()` function actually set the value of
`calculating` to `false`