Moves the logic of the devices collection to a dedicated repository.