Removes depreciated syntax and adds "globals"