 class ActivityManager : NSObject {
     var manager : CMMotionActivityManager?;
     var available = false;
-    var updating = false;
+    var updatingActivities = false;
 
     var isStationary = false;
 

        }

        if(self.available) {
            self.updating = true;

            manager!.startActivityUpdates(to: OperationQueue()) { data in
                if let data = data {

    let SECS_OLD_MAX = 2.0;

    var locationArray = [CLLocation]();
    var updatingLocation = false;
    var aggressive = false;

    var lowPowerMode = false;
