Fixing up updateLocation method

Simplified number of variable, prevented some leaky garbage
Merge pull request #1 from amadeus/master

Fixing up updateLocation method