Improved class generation for perec store