Modified toArray() methods of routes.