First version of dependency injector and service factory now working