Experiment with States

Trying to work out the best way to do multiple 'pages'...

This attempt uses States.

(I think you should merge this *locally* rather than to your master to see what you think first, or we should discuss whether we should use Loader and/or some other mechanism instead).

This pull request also cleans up the Javascript module to make it a bit more reusable.