Improve inversion of control