Some more fixes so that DeviceInfo class is used.