Optimize grades#view