Revert "Simplify the config but remove optimizations"

This reverts commit b9a6218e367414ca3dd003fc9abc408496b42020.
Simplify correctly the script