Added support for rotation perturbations; doubles size of training set