Code refactoring to increase redability of script_global_typology.