Updated for proper instantiation of ProcessNode subclasses.