Scenarios sample refactoring.