Replaced global variables with a configuration file