Improving the location detection - was progressively creating infinite number of threads on gwen's phone. Still not clear how this code really works and CMM doesn't seem to work.