Lines 85-89 could be one single set statement, and would be more efficient and easier to read. lines 88-89 could probably just be combined - if we find no plugins then the empty set isn't a lack of data, its a true statement: there rare in fact no plugins installed. Makes it easier for the receiver to write something to read it as well, since they do not have to decide whether to iterate over plugins.