Use a hash for devices rather than an array