Added inversion of control for all handlers