Fixed issues with enumerate.py and sped it up significantly