Added toArray() method to NamedList.