For loop index now only reaches the index length - 1.  Storing the current pin object in var for easier referencing.
Merge pull request #1 from jpsullivan/master

Basic alterations