Fixing up updateLocation method

Simplified number of variable, prevented some leaky garbage