Improving code quality of RegularTaskController