Various cleanup tasks completed.

Mouse tracking is much improved.
Interaction with DOM is factored out of the app constructor.