Updated Class definition logic.