Changes for iterate functions

-Ensure that they process only connected devices
-minor formatting issues
-minor UI changes