Added support for multiple node types