Massive refactoring

Stopwatches are now objects, quit always writes unsaved data, one-letter
commands replaced by complete words, 'magic strings' replaced by
variables.