move two appspecific handlers into app.

(put on hold due to issue #25)