Code

fix pasting of LPE's across multiple document; plus a number of small fixes.