Removed all instances of array references using id-1. Better to use a little more memory than waste all those CPU cycles with the -1's.
Changed paths: