Added refreshing loop to Device.java (getState[DeviceState]).
Should now always return the device's actual current state when called.
EDIT:That last commit was crap. Fixed it.