Revert "Changed myhandler to be an inner class"

This reverts commit 02480f57491318498af55719b2f73526e26695e1.