Finish optimizing the instructor panel queries