Removed usages of Array.forEach, Array.map & Array.indexOf to make the module ES3 compliant.