clean up AppHandler code