Rename function controller to controller_api