Rebased version of JoinNode PR 

@FredLoney this replaces #643 

i have rebased this on the current master.