Refactoring of chain controllers.