Refactored the training project