Improved and fixed enumerate.sh