Remove use of bash associative arrays: not supported in older versions of bash.