Controller generate for main.