Implemented a maximum number of devices allowed to be found in a single search, to prevent heap overflows/out of memory issues.