Optimize class