Start using backbone

Trying out the backbone framework. The code still needs quite a bit of
work, but at least it has some of the basic functionality and in some
ways is better than the original version.

In the long run this seems worth the effort.