Add the JOIN code from PAQU and make a few minor changes.  Not used by anything yet