added geopresence collector
major code re-arrangement