refactored manager and added injector