Reorganize API controller.