Class definition cashing added for better performance.