Optimize dummy class generation and loading. Code review pending by Kesler