Added support for route functions