Changed some refs to arrays and hashes