Used the enumerate method to simplify code.
See: http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html#index-item-2-enumerate