Added refreshing loop to Device.java (getState[DeviceState]).
Should now always return the device's actual current state when called.