Refactor main controller into multiple services