Refactored scaffold generators for easier testing