Make handle_class a method