Migrate handler from abstract classes to typedef