Moved out path parsing to NodeFactory.