Moved global vars to config