 }
 
 public enum PlaceType: CustomStringConvertible {
-  case All
-  case Geocode
-  case Address
-  case Establishment
-  case Regions
-  case Cities
+  case all
+  case geocode
+  case address
+  case establishment
+  case regions
+  case cities
 
   public var description : String {
     switch self {
-      case .All: return ""
-      case .Geocode: return "geocode"
-      case .Address: return "address"
-      case .Establishment: return "establishment"
-      case .Regions: return "(regions)"
-      case .Cities: return "(cities)"
-    }
-  }
-}
-
-public class Place: NSObject {
-  public let id: String
-  public let desc: String
-  public var apiKey: String?
-
-  override public var description: String {
+      case .all: return ""
+      case .geocode: return "geocode"
+      case .address: return "address"
+      case .establishment: return "establishment"
+      case .regions: return "(regions)"
+      case .cities: return "(cities)"
+    }
+  }
+}
+
+open class Place: NSObject {
+  open let id: String
+  open let desc: String
+  open var apiKey: String?
+
+  override open var description: String {
     get { return desc }
   }
 

      return
    }

    if response.statusCode != 200 {
      print("GooglePlaces Error: Invalid status code \(response.statusCode) from API")
      let error = NSError(domain: ErrorDomain, code: response.statusCode, userInfo: [NSLocalizedDescriptionKey:"Invalid status code"])
      done(nil,error)
      return
    }
    
    let json: NSDictionary?
    do {
      json = try NSJSONSerialization.JSONObjectWithData(
        data,
        options: NSJSONReadingOptions.MutableContainers) as? NSDictionary
    } catch {
      print("Serialisation error")
      let serialisationError = NSError(domain: ErrorDomain, code: 1002, userInfo: [NSLocalizedDescriptionKey:"Serialization error"])

    
  }

  open var description: String {
    return "PlaceDetails: \(name) (\(latitude), \(longitude))"
  }
}

@objc public protocol GooglePlacesAutocompleteDelegate {
  @objc optional func placesFound(_ places: [Place])
  @objc optional func placeSelected(_ place: Place)
  @objc optional func placeViewClosed()
}

// MARK: - GooglePlacesAutocompleteService

open class GooglePlacesAutocompleteService {
  var delegate: GooglePlacesAutocompleteDelegate?
  var apiKey: String?
  var places = [Place]()
  open var placeType: PlaceType = .all
  open var locationBias: LocationBias?
  open var country: String?
  
  public init(apiKey: String, placeType: PlaceType = .all) {
    self.apiKey = apiKey
    self.placeType = placeType
  }
  
  open func getPlaces(_ searchString: String, completion:@escaping (([Place]?, Error?) -> Void)) {
    var params = [
      "input": searchString,
      "types": placeType.description,
