Class definition and IoC framework