Improved Variable defenitions and arch detection