 									let newDevice = Device()
 									
 									newDevice.deviceID = device
-									newDevice.deviceCode = json["devices"][device]["BoardConfig"].stringValue
-									newDevice.deviceName = json["devices"][device]["name"].stringValue
+									newDevice.deviceCode = json[device]["BoardConfig"].stringValue
+									newDevice.deviceName = json[device]["name"].stringValue
 									
 									try! realm.write {
 										realm.add(newDevice)
 									}
 									
-									for firmware in json["devices"][device]["firmwares"].array! {
+									for firmware in json[device]["firmwares"].array! {
 										let newFirmware = Firmware()
 										
 										newFirmware.device = newDevice

	}
	
	func shaExists() -> Bool {
		guard NSUserDefaults.standardUserDefaults().stringForKey("firmwares.json.sha1") != nil else {
			return false
		}
		return true

			"User-Agent": "iOS/iFW-beta"
		]
		
		manager.request(.GET, "http://ifw-ninjaprawn.rhcloud.com/devices").responseJSON(completionHandler: { response in
			switch response.result {
				case .Success:
					if let value = response.result.value {
						if self.checkSHA(response.data!.sha1.hexString) {
							print("Data is the same! Don't need to do anything")
						} else {
							NSUserDefaults.standardUserDefaults().setObject(response.data!.sha1.hexString, forKey: "devicessha")
							let json = JSON(value)
							
							// First time?
							let realm = try! Realm()
							if !self.shaExists() {
								let devices = Array(json.dictionary!.keys)
								
								for device in devices {
									let newDevice = Device()
									
									newDevice.deviceID = device
									newDevice.deviceCode = json[device]["BoardConfig"].stringValue
									newDevice.deviceName = json[device]["name"].stringValue
									
									try! realm.write {
										realm.add(newDevice)
									}
									
									for firmware in json[device]["firmwares"].array! {
										let newFirmware = Firmware()
										
										newFirmware.device = newDevice
