Adding controller factory for DI
Merge branch 'controller-factory'