add option to limit query to a smaller number (easier to test); support sending mail to all component owners when no assignees set; tweak email copy & refactor some variables