Code refactoring in animation. Continue animation on application close-start again in training.