[MGTECON640] Pset 4 - Optimizing for ~3x runtime

Changing some data table code in inner loop. Runtime is now down to 5s
for 1000 iterations, from 15s.