Updates to scenarios 8, 9, 10, and additional refactoring