Issue #3319446 by elber, Anchal_gupta: In the controller and form files, We should use dependency injection