Added error checking for location  with nearest neigbors.
Merge branch 'master' of https://github.com/microcosm/beacondemo

Merging with Dexter's earlier changes.