Merge latest changes from the devices2 branch