       statsText += "Examined".rightAlign(inWidth: 10)
       statsText += "Enqueued".rightAlign(inWidth: 11)+"\n\n"
 
-      for index in 0...solution!.numMoves {
+      for index in 0...solution.numMoves {
          statsText += String(index).rightAlign(inWidth: 7)
-         statsText += String(solution!.numBoardsExaminedAtLevel[index]).rightAlign(inWidth: 10)
-         statsText += String(solution!.numBoardsEnqueuedAtLevel[index]).rightAlign(inWidth: 10)+"\n"
+         statsText += String(solution.numBoardsExaminedAtLevel[index]).rightAlign(inWidth: 10)
+         statsText += String(solution.numBoardsEnqueuedAtLevel[index]).rightAlign(inWidth: 10)+"\n"
       }
 
       statsText += "\n" + "Totals:".rightAlign(inWidth: 8)
-      statsText += String(solution!.numBoardsExamined).rightAlign(inWidth: 9)
-      statsText += String(solution!.numBoardsEnqueued).rightAlign(inWidth: 10) + "\n"
+      statsText += String(solution.numBoardsExamined).rightAlign(inWidth: 9)
+      statsText += String(solution.numBoardsEnqueued).rightAlign(inWidth: 10) + "\n"
 
       statsText += "\n" + "Per sec:".rightAlign(inWidth: 8)
 
-      var value = Double(solution!.numBoardsExamined)/solution!.timeInterval
+      var value = Double(solution.numBoardsExamined)/solution.timeInterval
       statsText +=  String(format: "%9.f", value)
 
-      value = Double(solution!.numBoardsEnqueued)/solution!.timeInterval
+      value = Double(solution.numBoardsEnqueued)/solution.timeInterval
       statsText += String(format: "%10.f", value) + "\n"
 
-      value = Double(solution!.numBoardsExamined) / Double(solution!.numBoardsEnqueued)
+      value = Double(solution.numBoardsExamined) / Double(solution.numBoardsEnqueued)
       statsText += "\nExamined/Enqueued = "
       statsText += String(format: "%.1f", value) + "\n"
 

         messageLabel.text = invalidImageMessage
      } else if state == .noSolutionExists {
         let fullMessage = "\n    \(noSolutionExistsMessage)    \n"
            + "    Halted at level \(solution!.numMoves).\n"
         messageLabel.textColor = Const.urgentMessageLabelColor
         messageLabel.text = fullMessage
      } else {

      var statsText = ""
      if state == .noSolutionExists {
         statsText += "The puzzle was determined to be unsolvable after checking "
         statsText += "levels 0 to \(solution.numMoves) in "
      } else {
         statsText += "A solution was found at level \(solution.numMoves) in "
      }
      statsText += "\(String(format: "%.2f", solution.timeInterval)) seconds. "
      statsText += "Maximum queue size was \(solution.maxQSize) entries "
      statsText += "and final dictionary size was "
      statsText += "\(solution.numBoardsEnqueued) entries.\n\n"

      statsText += "Boards".rightAlign(inWidth: 17)
      statsText += "Boards".rightAlign(inWidth: 11)+"\n"
