Use logic from Scenario instead of embedding in the page