Those lines are not a solution to remove countries, please remove unnecessary countries form the DB.
2. for goal optional, you need to remove it from validation and from the few others specific areas.
For others any customizations, it’s really tough to provide line by line support for your customization, please hire a laravel developer to get done exactly what you want.
However, as per envato terms, we provide supports for the features that we mentioned, if facing any error and applications stopped working. It’s really tough to provide line by line for your customization.
Best Regards