Added some changes for location and map awerness.