Added config
Changed the way the variables are used