added ReferenceNode atom type
simplify structure
use the new ReferenceNode