Move globals to object as arg