Add leaf factory