Modified controller to use the updated codeigniter-restserver framework.