refactored logic, clean support for wet and dry with recursion and multiple package/stack/variant names