Added some base classes and autowire support