Added support for named functions