Switch list iteration to index-based as it is more efficient on android.
Merge pull request #411 from adriancole/efficient-iteration

Switch list iteration to index-based as it is more efficient on android.