Refactoring existing code for new srpy driver; minor changes for serialization of scenarios