Reorganize test nesting and provider/options loop