cleaned the config vars
refactored and cleaned