Created observer pattern for location and activity changes.