Added register saving and working on global variable referencing