So collecting up the various pinModes and rewriting into an array and then looping thru it might be refactoring?