Cleaned and fixed A.m and loadGlobals