Index controller to class