Get rid of worksheet wrapper, restructure app.

Also clean up the way that event handlers are added to the app by the
worksheet.