Refactoring.
Refactoring.
Refactoring.
Updates command for leaving train.