Refactored fetch() to use `while IFS="" read -r` instead of `grep -E`.