Added location services and error checking.