 
 
 if CLIFanIdOption.isSet && CLIFanSpeedOption.isSet {
-    setMinFanSpeed(CLIFanIdOption.value!, CLIFanSpeedOption.value!)
+    setMinFanSpeed(CLIFanIdOption.value!, fanSpeed: CLIFanSpeedOption.value!)
 }
 else if CLIFanSpeedOption.isSet != CLIFanIdOption.isSet {   // XOR
-    println("Usage: Must set fan number (-n) AND fan speed (-s)")
+    print("Usage: Must set fan number (-n) AND fan speed (-s)")
 }
 
 if let key = CLICheckKeyOption.value { checkKey(key) }

}

func checkKey(key: String) {
    if smc.isKeyValid(key).valid { println("VALID")   }
    else                         { println("INVALID") }
}

func setMinFanSpeed(fanNumber: Int, fanSpeed: Int) {
    let result = smc.setFanMinRPM(UInt(fanNumber), RPM: UInt(fanSpeed))

    if result.result { println("SUCCESS") }
    else if result.IOReturn == kIOReturnNotPrivileged {
        println("This operation must be invoked as the superuser")
    }
    else if result.IOReturn == kIOReturnBadArgument {
        let maxSpeed = smc.getFanMaxRPM(UInt(fanNumber)).rpm
        println("Invalid fan speed. Must be <= max fan speed (\(maxSpeed))")
    }
    else if result.kSMC == SMC.kSMC.kSMCKeyNotFound.rawValue {
        println("This machine has no fan #\(fanNumber)")
    }
    else {
        println("FAILED: IOKit(\(result.IOReturn)), SMC(\(result.kSMC))")
    }
}


            let min     = smc.getFanMinRPM(i).rpm
            let max     = smc.getFanMaxRPM(i).rpm

            let warning = warningLevel(Double(current), maxValue: Double(max))
            let level   = CLIWarnOption.value ? "(\(warning.name))" : ""
            let color   = CLIColorOption.value ? warning.color : ANSIColor.Off

            print("[id \(i)] \(name)")
            print("\tCurrent:  \(color.rawValue)\(current) RPM \(level)" +
                                                    "\(ANSIColor.Off.rawValue)")
            print("\tMin:      \(min) RPM")
            print("\tMax:      \(max) RPM")
        }
    }
}

func printPowerInformation() {
    print("-- POWER --")
    print("AC Present:       \(colorBoolOutput(smc.isACPresent().flag))")
    print("Battery Powered:  \(colorBoolOutput(smc.isBatteryPowered().flag))")
    print("Charging:         \(colorBoolOutput(smc.isCharging().flag))")
    print("Battery Ok:       \(colorBoolOutput(smc.isBatteryOk().flag))")
    print("Max Batteries:    \(smc.maxNumberBatteries().count)")
}

func printMiscInformation() {
    print("-- MISC --")

    let ODDStatus = smc.isOpticalDiskDriveFull().flag
    print("Disc in ODD:      \(colorBoolOutput(ODDStatus))")
}

func printAll() {
