     }
   }
 
-  func visit(page url: Foundation.URL) {
+  /// Tells the crawler to visit the given `url` page.
+  /// - Parameter url: The page we want to visit.
+  func visit(page url: URL) {
     visitedPages.insert(url)
 
     currentTask = URLSession.shared.dataTask(with: url) { [weak self] data, _, _ in

    currentTask?.resume()
  }

  func parse(document: String, url: Foundation.URL) {
    func find(word: String, from document: String) {
      guard document.contains(word) else { return }
      wordFoundCallback(url)
    }

    func collectLinks(from document: String) -> [Foundation.URL] {
      let types: NSTextCheckingResult.CheckingType = .link
      let detector = try? NSDataDetector(types: types.rawValue)
      let range = NSRange(0..<document.count)

    self.completion = completion
  }

  /// Trigger the instance to start crawling the web.
  public func start() {
    crawl()
  }

  /// Immediately ends the crawling process.
  public func cancel() {
    currentTask?.cancel()
    completion(visitedPages.count)
  }

  /// Starts a new crawling cycle.
  func crawl() {
    guard
      visitedPages.count < maximumPagesToVisit,
