Added a more intelligent way of checking for gps/wifi location
capabilities.