Restructured code relating to global parameters