removed extra trim and indexOf prototype definitions